WOLF core
WOLF: A Modular Estimation Framework for Robotics
XXXXXXXXXXXXXXXXXXXXXXXXvoid(0)" frameborder="0" name="MSearchResults" id="MSearchResults">
wolf::MapBase Class Reference

Base class of maps: container of the landmarks. More...

#include <core/map/map_base.h>

Inheritance diagram for wolf::MapBase:
[legend]

Public Member Functions

 WOLF_MAP_CREATE (MapBase)
 
 ~MapBase () override=default
 
bool hasChildren () const override
 Returns whether the node has children in the Wolf tree. More...
 
LandmarkBaseConstPtrList getLandmarkList () const
 Returns the landmarks of the map. More...
 
LandmarkBasePtrList getLandmarkList ()
 Returns the landmarks of the map. More...
 
LandmarkBaseConstPtr getLandmark (const unsigned int &_id) const
 Returns the landmark with a given id (nullptr if not found) More...
 
LandmarkBasePtr getLandmark (const unsigned int &_id)
 Returns the landmark with a given id (nullptr if not found) More...
 
virtual void load (std::string _map_file_yaml)
 Creates the landmarks of a YAML map file and links them to the map. More...
 
virtual bool save (std::string _map_file_yaml, const std::string &_map_name="") const
 Saves the landmarks to a YAML map file. Returns whether it succeeded. More...
 
virtual void printHeader (int depth, bool factored_by, bool metric, bool state_blocks, std::ostream &stream, std::string _tabs="") const
 Prints the information of this node (not of its children) More...
 
virtual void print (int depth, bool factored_by, bool metric, bool state_blocks, std::ostream &stream=std::cout, std::string _tabs="") const
 Prints this node and, depending on the depth, its children. More...
 
virtual CheckLog localCheck (bool _verbose, std::ostream &_stream, std::string _tabs="") const
 Checks the consistency of this node (not of its children) More...
 
virtual bool check (CheckLog &_log, bool _verbose, std::ostream &_stream, std::string _tabs="") const
 Checks the consistency of this node and its children, composing the log. More...
 
- Public Member Functions inherited from wolf::NodeBase
 NodeBase (const std::string &_category, const std::string &_type="Undefined", const std::string &_name="")
 Constructor. More...
 
virtual ~NodeBase ()=default
 Destructor. More...
 
unsigned int nodeId () const
 Returns the node id, unique over the whole Wolf tree. More...
 
std::string getCategory () const
 Returns the category of the node. More...
 
std::string getType () const
 Returns the type (subcategory) of the node. More...
 
std::string getName () const
 Returns the name of the node. More...
 
bool isRemoving () const
 Returns whether the node is being removed. More...
 
virtual bool hasChildren () const =0
 Returns whether the node has children in the Wolf tree. More...
 
void setType (const std::string &_type)
 Sets the type (subcategory) of the node. More...
 
void setName (const std::string &_name)
 Sets the name of the node. More...
 
ProblemConstPtr getProblem () const
 Returns the problem the node belongs to. More...
 
ProblemPtr getProblem ()
 Returns the problem the node belongs to. More...
 

Protected Member Functions

 MapBase ()
 Default constructor. More...
 
 MapBase (const YAML::Node &_params)
 Constructor from YAML parameters (not used by MapBase) More...
 
 MapBase (const std::string &_type, const YAML::Node &_params)
 Constructor for derived maps, with their type and YAML parameters. More...
 
virtual LandmarkBasePtr addLandmark (LandmarkBasePtr _landmark_ptr)
 Adds a landmark to the list of landmarks. More...
 
virtual void removeLandmark (LandmarkBasePtr _landmark_ptr)
 Removes a landmark from the list of landmarks. More...
 
- Protected Member Functions inherited from wolf::NodeBase
virtual void setProblem (ProblemPtr _prob_ptr)
 Sets the problem the node belongs to. More...
 

Additional Inherited Members

- Protected Attributes inherited from wolf::NodeBase
ProblemWPtr problem_ptr_
 Problem the node belongs to. More...
 
unsigned int node_id_
 Node id. It is unique over the whole Wolf Tree. More...
 
std::string node_category_
 Text label identifying the category of node ("SENSOR", "FEATURE", etc) More...
 
std::string node_type_
 Type or subcategory of node (derived class name: "SensorOdom2d", etc) More...
 
std::string node_name_
 
bool is_removing_
 A flag for safely removing nodes from the Wolf tree. See remove(). More...
 

Detailed Description

Base class of maps: container of the landmarks.

Constructor & Destructor Documentation

◆ MapBase() [1/3]

wolf::MapBase::MapBase ( )
protected

Default constructor.

◆ MapBase() [2/3]

wolf::MapBase::MapBase ( const YAML::Node &  _params)
protected

Constructor from YAML parameters (not used by MapBase)

◆ MapBase() [3/3]

wolf::MapBase::MapBase ( const std::string &  _type,
const YAML::Node &  _params 
)
protected

Constructor for derived maps, with their type and YAML parameters.

◆ ~MapBase()

wolf::MapBase::~MapBase ( )
overridedefault

Member Function Documentation

◆ addLandmark()

LandmarkBasePtr wolf::MapBase::addLandmark ( LandmarkBasePtr  _landmark_ptr)
protectedvirtual

Adds a landmark to the list of landmarks.

◆ check()

bool wolf::MapBase::check ( CheckLog &  _log,
bool  _verbose,
std::ostream &  _stream,
std::string  _tabs = "" 
) const
virtual

Checks the consistency of this node and its children, composing the log.

◆ getLandmark() [1/2]

LandmarkBasePtr wolf::MapBase::getLandmark ( const unsigned int &  _id)

Returns the landmark with a given id (nullptr if not found)

◆ getLandmark() [2/2]

LandmarkBaseConstPtr wolf::MapBase::getLandmark ( const unsigned int &  _id) const

Returns the landmark with a given id (nullptr if not found)

◆ getLandmarkList() [1/2]

LandmarkBasePtrList wolf::MapBase::getLandmarkList ( )
inline

Returns the landmarks of the map.

◆ getLandmarkList() [2/2]

LandmarkBaseConstPtrList wolf::MapBase::getLandmarkList ( ) const
inline

Returns the landmarks of the map.

◆ hasChildren()

bool wolf::MapBase::hasChildren ( ) const
overridevirtual

Returns whether the node has children in the Wolf tree.

Implements wolf::NodeBase.

◆ load()

void wolf::MapBase::load ( std::string  _map_file_yaml)
virtual

Creates the landmarks of a YAML map file and links them to the map.

◆ localCheck()

CheckLog wolf::MapBase::localCheck ( bool  _verbose,
std::ostream &  _stream,
std::string  _tabs = "" 
) const
virtual

Checks the consistency of this node (not of its children)

◆ print()

void wolf::MapBase::print ( int  depth,
bool  factored_by,
bool  metric,
bool  state_blocks,
std::ostream &  stream = std::cout,
std::string  _tabs = "" 
) const
virtual

Prints this node and, depending on the depth, its children.

◆ printHeader()

void wolf::MapBase::printHeader ( int  depth,
bool  factored_by,
bool  metric,
bool  state_blocks,
std::ostream &  stream,
std::string  _tabs = "" 
) const
virtual

Prints the information of this node (not of its children)

◆ removeLandmark()

void wolf::MapBase::removeLandmark ( LandmarkBasePtr  _landmark_ptr)
protectedvirtual

Removes a landmark from the list of landmarks.

◆ save()

bool wolf::MapBase::save ( std::string  _map_file_yaml,
const std::string &  _map_name = "" 
) const
virtual

Saves the landmarks to a YAML map file. Returns whether it succeeded.

◆ WOLF_MAP_CREATE()

wolf::MapBase::WOLF_MAP_CREATE ( MapBase  )

The documentation for this class was generated from the following files: